package com.itsome.api;

import com.itsome.service.ExcelServiceImpl;
import com.itsome.util.ExcelUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * @author jmj on 2021-01-10
 */
@RestController
public class ExcelApi {

    @Autowired
    private ExcelServiceImpl excelService;

    @PostMapping("staffBuImport")
    public List<?> staffBuImport(@RequestParam("file") MultipartFile file) throws IOException {
        return excelService.importBuInfo(file);
    }
}
